<template>
  <Start @handler="handlers" :class="[ isChecked ? 'muhu' : '' ]" style="cursor: default;" />
  <transition enter-active-class="animate__animated animate__fadeIn" leave-active-class="animate__animated animate__fadeOut">
    <div v-show="isChecked" class="flow-screen">
      <div class="bang">
        <div class="bang-success">
          <img src="/img/resetpwd.png" alt="">
        </div>
        <div class="bang-title">密码修改成功</div>
        <div class="bang-description">您的密码已被修改成功</div>
        <div class="bang-button" @click="$router.push({
          name: 'login'
        })">去登录</div>
      </div>
    </div>
  </transition>
</template>

<script setup lang="ts">
import { ref } from 'vue'

const isChecked = ref(false)

const handlers = (num:Array<{ value:string }>) => {
  console.log(num)
  isChecked.value = true
}
</script>

<style lang="less" scoped>
.muhu {
  background-color: #e5e5e5;
  filter: blur(10px);
  transition: all 0.4s;
}

.flow-screen {
  position: absolute;
  width: 100%;
  height: 100%;

  .bang {
    position: absolute;
    width: 432px;
    background-color: #fff;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    padding: 30px 0 20px 0;

    box-sizing: border-box;
    border: 1px solid rgba(163, 170, 171, 0.2);
    border-radius: 20px;
    box-shadow: 0px 8px 8px -4px rgba(16, 24, 40, 0.02),0px 10px 40px -4px rgba(16, 24, 40, 0.02);
    
    background: rgb(255, 255, 255);

    .bang-success {
      img {
        width: 108px;
        height: 108px;
      }
    }

    .bang-title {
      color: rgb(20, 28, 29);
      font-family: Epilogue;
      font-size: 24px;
      font-weight: 700;
      line-height: 28px;
      margin-top: 20px;
    }

    .bang-description {
      color: rgb(20, 28, 29);
      font-family: Epilogue;
      font-size: 16px;
      font-weight: 400;
      line-height: 30px;
      margin-top: 13px;
    }

    .bang-button {
      width: 90%;
      height: 45px;
      background-color: #088395;
      display: flex;
      align-items: center;
      justify-content: center;
      border-radius: 10px;

      color: rgb(255, 255, 255);
      font-family: Epilogue;
      font-size: 16px;
      font-weight: 400;
      line-height: 30px;
      letter-spacing: 0%;
      text-align: left;
      cursor: pointer;

      margin-top: 32px;
      transition:all 0.4s;
    }

    .bang-button:hover {
      background: rgb(22, 162, 184);
    }
  }
}


</style>